﻿using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;


namespace VoxelBlock.VoxelBlock3D
{

    [CustomEditor(typeof(DrawVoxel3DCoreComponent))]
    [ExecuteInEditMode]
    public class DrawVoxel3DCoreComponentEditor : Editor
    {
        //在这里方法中就可以绘制面板。
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            DrawVoxel3DCoreComponent com = (DrawVoxel3DCoreComponent)target;

            if (GUILayout.Button("Delete"))
            {
                com.Delete();
            }

            if (GUILayout.Button("合并"))
            {
                com.Merge();
            }

            com.Alpha = EditorGUILayout.Slider("Alpha", com.Alpha, 0f, 1f);

        }
    }


}
